package com.weixing.mall.provider.model.vo.report.market;

import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.weixing.mall.provider.support.excel.EnumConverter.PersentConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * @author jzy
 * @date 2020/5/31
 */
@Data
@Accessors(chain = true)
@ApiModel(value="MarketAreaSalesVo", description="市场部-推荐人报表")
public class MarketAreaSalesVo {

    @ApiModelProperty(value = "省份")
    @ExcelIgnore
    private String  province;
    @ApiModelProperty(value = "城市")
    @ExcelIgnore
    private String  city;
    @ApiModelProperty(value = "区/县")
    @ExcelIgnore
    private String  region;

    @ExcelProperty("地区")
    private String area;
    public void setProvince(String province){
        this.province=province;
        String p = StrUtil.isNotEmpty(this.province) ? this.province : "";
        String c = StrUtil.isNotEmpty(this.city) ? this.city : "";
        String r = StrUtil.isNotEmpty(this.region) ? this.region : "";
        this.area = p + c + r;
    }

    @ApiModelProperty(value = "下单笔数")
    @ExcelProperty({"下单信息","笔数"})
    private Integer quantity;
    @ApiModelProperty(value = "下单笔数占比")
    @ExcelProperty(value = {"下单信息","笔数占比（%）"},converter = PersentConverter.class)
    private BigDecimal orderRate;
    @ApiModelProperty(value = "下单金额(包括退货，断货，取消的)")
    @ExcelProperty({"下单信息","金额"})
    private BigDecimal amount;
    @ApiModelProperty(value = "下单金额占比")
    @ExcelProperty(value = {"下单信息","金额占比（%）"},converter = PersentConverter.class)
    private BigDecimal orderAmountRate;
    @ApiModelProperty(value = "断货笔数")
    @ExcelProperty({"断货信息","笔数"})
    private Integer stockoutQuantity;
    @ApiModelProperty(value = "断货笔数占比")
    @ExcelProperty(value = {"断货信息","笔数占比（%）"},converter = PersentConverter.class)
    private BigDecimal stockoutRate;
    @ApiModelProperty(value = "断货金额(包括退货，断货，取消的)")
    @ExcelProperty({"断货信息","金额"})
    private BigDecimal stockoutAmount;
    @ApiModelProperty(value = "断货金额占比")
    @ExcelProperty(value = {"断货信息","金额占比（%）"},converter = PersentConverter.class)
    private BigDecimal stockoutAmountRate;
    @ApiModelProperty(value = "退货笔数")
    @ExcelProperty({"退货信息","笔数"})
    private Integer returnQuantity;
    @ApiModelProperty(value = "退货笔数占比")
    @ExcelProperty(value = {"退货信息","笔数占比（%）"},converter = PersentConverter.class)
    private BigDecimal returnRate;
    @ApiModelProperty(value = "退货金额(包括退货，断货，取消的)")
    @ExcelProperty({"退货信息","金额"})
    private BigDecimal returnAmount;
    @ApiModelProperty(value = "退货金额占比")
    @ExcelProperty(value = {"退货信息","金额占比（%）"},converter = PersentConverter.class)
    private BigDecimal returnAmountRate;
    @ApiModelProperty(value = "取消笔数")
    @ExcelProperty({"取消信息","笔数"})
    private Integer cancelQuantity;
    @ApiModelProperty(value = "取消笔数占比")
    @ExcelProperty(value = {"取消信息","笔数占比（%）"},converter = PersentConverter.class)
    private BigDecimal cancelRate;
    @ApiModelProperty(value = "取消金额(包括退货，断货，取消的)")
    @ExcelProperty({"取消信息","金额"})
    private BigDecimal cancelAmount;
    @ApiModelProperty(value = "取消金额占比")
    @ExcelProperty(value = {"取消信息","金额占比（%）"},converter = PersentConverter.class)
    private BigDecimal cancelAmountRate;
    @ApiModelProperty(value = "发货部发货")
    @ExcelProperty("发货部发货")
    private Integer dispatchDept;
    @ApiModelProperty(value = "仓库部发货")
    @ExcelProperty("仓库部发货")
    private Integer storeDept;
    @ApiModelProperty(value = "置换")
    @ExcelProperty("置换")
    private Integer exchange;
}
